home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / EMIL.ARJ / HI.HPP < prev    next >
Text File  |  1991-05-07  |  2KB  |  58 lines

  1. /* hi.hpp: Header file for HIMEM.SYS support code
  2.  * This file is for C++ programmers to include.  The "C" qualifier
  3.  * prevents the C++ compiler from mangling the function name.
  4.  *
  5.  * This file may be distributed freely as long as it is not
  6.  * separated from the rest of the Extended Memory Interface Library.
  7.  *
  8.  */
  9.  
  10. extern "C" {
  11.  
  12. /* Return nonzero if HIMEM is installed */
  13. int far cdecl pinghi(void);
  14.  
  15. /* Initialize stuff.  Call once before anything else. */
  16. void far cdecl hiinit(void);
  17.  
  18. /* Allocate extended memory.  Returns handle to memory
  19.  * allocated, or 0 if HIMEM could not allocate it.
  20.  */
  21. unsigned int far cdecl himalloc(unsigned long size);
  22.  
  23. /* Free extended memory. */
  24. void far cdecl hifree(unsigned int handle);
  25.  
  26. /* hicontig returns the size of the largest contiguous block of
  27.  * extended memory.  himemavl returns the total extended memory
  28.  * available.
  29.  */
  30. unsigned long far cdecl hicontig(void);
  31. unsigned long far cdecl himemavl(void);
  32.  
  33. /* hilock locks (write-protects) the given handle.
  34.  * hiunlock unprotects a previously locked handle.
  35.  */
  36. int far cdecl hilock(unsigned handle);
  37. int far cdecl hiunlock(unsigned handle);
  38.  
  39. /* hi2real copies from extended memory to DOS memory;
  40.  * real2hi copies from DOS memory to extended memory.
  41.  * DOS memory is specified as a normal far pointer.
  42.  * Extended memory is specified as a handle and a 32-bit
  43.  * offset from that handle.
  44.  *
  45.  * Both functions return 1 if successful and 0 if not.
  46.  */
  47. int far cdecl hi2real(void far *dest,
  48.               unsigned src,
  49.               unsigned long offset,
  50.               unsigned count);
  51.  
  52. int far cdecl real2hi(unsigned dest,
  53.               unsigned long offset,
  54.               void far *src,
  55.               unsigned count);
  56.  
  57. }    /* extern "C" */
  58.